All Questions
7 questions
1vote
3answers
584views
Make STDIN executable with shebang
I have a program to list database files. It is called direkly from the shell like db filename to list the whole file, or like db 'filename :: conditions' to list only selected elements ... Another ...
8votes
2answers
1kviews
Equivalent of executing a file (with shebang line) by entering its path?
Say I have a file hello: #!/bin/sh echo "Hello World!" Provided the executable bit is set on that file, I can execute it by entering its path on the prompt: $ ./hello Hello World! Is ...
92votes
1answer
12kviews
Why does the following bash script delete itself?
If you create an executable file with the following contents, and run it, it will delete itself. How does this work? #!/bin/rm
13votes
2answers
65kviews
Bash Script Permission denied & Bad Interpreter
I'm on a kali linux 64 bit. I have created a python script which takes 2 arguments to start. I don't want to type out every time the exact same paths or search in the history of the commands I used ...
5votes
2answers
864views
run perl script with unknown perl location
I'm developing a perl script which expected to be downloaded by Mac users with a very small knowledge of shell, linux etc, let's say office managers and accountants. After the downloading the script ...
6votes
1answer
1kviews
What is the difference in these two bash environments?
I notice that with bash scripts, some people use a different shebang to the one that I'm used to putting at the top of my own. Can someone simplify the difference between these two? I use the #!/bin/...
112votes
8answers
421kviews
#!/bin/bash - no such file or directory
I've created a bash script but when I try to execute it, I get #!/bin/bash no such file or directory I need to run the command: bash script.sh for it to work. How can I fix this?